BUILTIN\Administrators in Sysadmin Role

Issue

In many installations (particularly in enterprise scenarios) administrators like to see the distinction between the roles of the operating system administrator and the SQL Server™ administrator. In such scenarios it might be useful to remove the local Windows® administrators' membership in the SQL sysadmin role. However, in smaller deployments of SQL Server or in local Microsoft® SQL Server Desktop Engine (MSDE) or WMSDE scenarios, it may be acceptable to ignore this check and leave the local administrators inside the sysadmin role.

Solution

Remove BUILTIN\Administrators from the Sysadmin role.

Note:

Important

Instructions

  1. Click Start, point to Programs, point to Microsoft SQL Server, and then click Enterprise Manager.
  2. In SQL Server Enterprise Manager, double-click SQL Server Group, and then double-click the SQL Server that you want to secure.
  3. Click the Security folder, click Server Roles, and then double-click System Administrators in the right pane.
  4. In the Server Role Properties dialog box, click BUILTIN\Administrators, and then click Remove.

In scenarios where there is no Enterprise Manager (as in the case of MSDE or WMSDE) or when it is desired to perform the above actions through a script, the following can be done:

  1. Open a command prompt window.
  2. Use the osql utility to connect to the SQL instance using a valid login.
  3. Issue the following command to remove the BUILTIN\Administrators group from the sysadmin role:
    1. sp_dropsrvrolemember 'builtin\administrators','sysadmin'
    2. go

Additional Information

SQL Server 7.0 Security

Microsoft SQL Server 2000 Security


©2002-2004 Microsoft Corporation. All rights reserved.